package com.eternal.permission.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 角色权限表
 * </p>
 *
 * @author Eternal
 * @since 2018-08-26
 */
@Data
@Accessors(chain = true)
@TableName("b_role_permission")
public class RolePermission extends Model<RolePermission> {

    private static final long serialVersionUID = 1L;

    @TableId("rp_role_id")
    private String rpRoleId;
    @TableField("rp_permission")
    private String rpPermission;


    @Override
    protected Serializable pkVal() {
        return this.rpRoleId;
    }

    public RolePermission(String rpRoleId, String rpPermission) {
        this.rpRoleId = rpRoleId;
        this.rpPermission = rpPermission;
    }

    public RolePermission() {
    }
}
